<template>
    <div class="kongTiao">
        <div class="main">
            <p class="top">
                <label>荷园-101</label>
                <span>
                    <img src="@/assets/images/newIndex/new/12.png" />
                    <img src="@/assets/images/newIndex/new/13.1.png" />
                </span>
            </p>
            <div class="temp">
                <p>
                    <label v-for="(item, i) in value1.length" v-bind:key="i">{{ value1[i] }}</label>
                    <span v-if="value2.length > 0"> &nbsp;. </span>
                    <template v-if="value2.length > 0">
                        <label v-for="(item, i) in value2.length" v-bind:key="i">{{ value2[i] }}</label></template
                    >
                    kwh
                </p>
            </div>

            <div class="dl">
                <div>电流：1200A &nbsp; 功率因素：1.0</div>
                <div>电压：1000V &nbsp; 有功功率：500W</div>
            </div>

            <div class="error">
                <div>
                    <img src="@/assets/images/newIndex/new/14.png" />
                    <label>过压</label>
                </div>
                <div>
                    <img src="@/assets/images/newIndex/new/14.png" />
                    <label>欠压</label>
                </div>
                <div>
                    <img src="@/assets/images/newIndex/new/14.png" />
                    <label>漏电</label>
                </div>
                <div>
                    <img src="@/assets/images/newIndex/new/14.png" />
                    <label>倾斜</label>
                </div>
            </div>

            <img src="@/assets/images/newIndex/new/ld1.1.png" v-if="!kz1" class="img1 imgPo" @click="imgClick1" />
            <img src="@/assets/images/newIndex/new/ld1.png" v-if="kz1" class="img1 imgPo" @click="imgClick1" />

            <img src="@/assets/images/newIndex/new/9.png" v-if="close" class="img9 imgPo" @click="imgClick9" />
            <img src="@/assets/images/newIndex/new/9.1.png" v-if="!close" class="img9 imgPo" @click="imgClick9" />

            <div class="circle">
                <div class="item">
                    光照值LUX <br />
                    100000
                </div>
                <div class="item">
                    调光比 <br />
                    100%
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    props: ['currentNodeId', 'currentNodeName', 'dir'],
    components: {},
    name: 'zhaoMing',
    data() {
        return {
            kz1: false,
            kz2: true,
            kz3: false,
            kz4: false,
            kz5: false,
            close: false,
            value1: '100000',
            value2: '00'
        }
    },
    computed: {},
    created() {},
    methods: {
        imgClick1() {
            this.kz1 = !this.kz1
        },
        imgClick2() {
            this.kz2 = !this.kz2
        },
        imgClick3() {
            this.kz3 = !this.kz3
        },
        imgClick4() {
            this.kz4 = !this.kz4
        },
        imgClick5() {
            this.kz5 = !this.kz5
        },
        imgClick9() {
            this.close = !this.close
        }
    }
}
</script>

<style scoped lang="scss">
.kongTiao {
    display: flex;
    width: 100%;
    height: 100%;
    background: url('@/assets/images/newIndex/new/ktBg.png') no-repeat top left;
    background-size: 100% 100%;
    overflow: hidden;
    position: relative;
    .main {
        padding: 10px 20px;
        width: 100%;
        .top {
            display: flex;
            height: 25px;
            line-height: 25px;
            width: 100%;
            color: #fff;
            label {
                font-size: 14px;
                flex: 1;
            }
            span {
                font-size: 12px;
                text-align: right;
                img {
                    margin-left: 10px;
                    cursor: pointer;
                }
            }
        }
        .temp {
            font-size: 16px;
            p {
                font-size: 16px;
                padding-left: 20px;
                padding-top: 15px;
                display: flex;
                align-items: center;
                color: #000;
                span {
                    font-size: 20px;
                }
                label {
                    margin: 0 2px;
                    padding: 0 5px;
                    font-size: 26px;
                    border: 1px solid #e0e0e0;
                    background-color: #fff;
                    color: #000;
                    border-radius: 4px;
                }
            }
        }
        .error {
            font-size: 14px;
            display: flex;
            margin-top: 5px;
            align-items: center;
            margin-left: 40px;
            div {
                margin-right: 5px;
                img {
                    vertical-align: middle;
                    margin-right: 5px;
                    cursor: pointer;
                }
                label {
                    font-size: 12px;
                }
            }
        }
        .circle {
            position: absolute;
            right: 0px;
            bottom: 34px;
            display: flex;

            .item {
                display: flex;
                justify-content: center;
                align-items: center;
                height: 70px;
                width: 70px;
                border-radius: 70px;
                margin-right: 10px;
                font-size: 12px;
                text-align: center;
            }
            .item:nth-child(1) {
                background: url('@/assets/images/newIndex/new/bg1.png') no-repeat;
                background-size: 100%;
                border: 10px solid #fff;
            }
            .item:nth-child(2) {
                background: url('@/assets/images/newIndex/new/bg1.1.png') no-repeat;
                background-size: 100%;
                border: 10px solid #d8e6fc;
            }
        }
        .dl {
            font-size: 12px;
            margin-top: 135px;
            display: inline-block;
            margin-left: 40px;
            div {
                font-size: 12px;
                border: 1px solid #5482f2;
                padding: 5px;
                border-radius: 4px;
                margin-right: 5px;
                margin-top: 5px;
            }
        }
        .imgPo {
            position: absolute;
            cursor: pointer;
        }
        .img1 {
            top: 10px;
            right: 60px;
            height: 109px;
        }
        .img2 {
            top: 155px;
            left: 123px;
        }
        .img3 {
            top: 127px;
            left: 194px;
        }
        .img4 {
            top: 95px;
            left: 270px;
        }
        .img5 {
            top: 76px;
            right: 31px;
        }
        .img6 {
            bottom: 106px;
            right: 82px;
        }
        .img7 {
            bottom: 90px;
            right: 67px;
        }
        .img8 {
            bottom: 69px;
            right: 53px;
        }
        .img9 {
            bottom: 50px;
            left: 10px;
        }
    }
}
</style>
